package interfaces;

import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
        Employee[] staff = new Employee[3];

        staff[0] = new Employee("one", 100000);
        staff[1] = new Employee("two", 30000);
        staff[2] = new Employee("three", 40000);

        Arrays.sort(staff);

        // Print out information about all Employee objects
        for (Employee e : staff) {
            System.out.println("name=" + e.getName() + ",salary=" + e.getSalary());
        }
    }
}
